<?php
$id=$_GET['id'];
$name=$_POST['editname'];
$conn = mysql_connect('localhost','root' ,'vertrigo');
mysql_select_db('tdc');

$result = mysql_query("update students set name='".$name."' where id='".$id."'");
?>


<html>
    <head>
        <meta charset="UTF-8">
        <link href="style.css" rel="stylesheet" type="text/css"/>
        <meta http-equiv="refresh" content="2; url=index.php"/>
    </head>
    <body>
        <div class="wrapper">
            <div class="info">
                <?php
                if ($result == true) {
                    echo "Sua Thanh cong, Ban se quay lai trang chu trong giay lat...";
                } else {
                    echo "Sua That bai, Ban se quay lai trang chu trong giay lat....";
                }
                ?>
            </div>
        </div>
       
    </body>
</html>
